import Vue from 'vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import registerDrag from 'vue-easy-drager'
// 引入ECharts
import * as echarts from 'echarts';
import 'echarts';
import http from '@/http';
import App from './App.vue'
import router from './router'
import './utils/filter'
import $TZmessage from './utils/message'
import store from '@/store';
import highLight from './components/highLight'
import tzTable from '@/components/tz-table'
import tzFilter from '@/components/tz-filter'

Vue.component('ECharts',echarts);
Vue.use(ElementUI);
Vue.config.productionTip = false
registerDrag(Vue)
Vue.component('high-light', highLight)
Vue.component('tz-table', tzTable)
Vue.component('tz-filter', tzFilter)

Object.defineProperty(Vue.prototype, '$http', {
  get: function() {
    return http
  },
});
Object.defineProperty(Vue.prototype, '$TZmessage', {
  get: function() {
    return $TZmessage
  },
});
new Vue({
  router,
  store,
  render: h => h(App),
  beforeCreate(){
    Vue.prototype.$bus = this
  },
}).$mount('#app')
